﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Runtime.Remoting.Channels;
using System.Web.Http;
using Home.Web.Models.ImageInfo;
using Home.Web.Services.Carousel;

namespace Home.Web.Controllers
{
    public class ImageInfoController : ApiController
    {
        public List<ImageInfo> Get()
        {
            string category = "grist mill";
            string path = Url.Content("~/images");
            var imageInfos = CarouselService.GetImageInfos(category);
            return imageInfos;
        }
        [Route("api/ImageInfo/{category}")]
        public List<ImageInfo> Get(string category)
        {
            var imageInfos = CarouselService.GetImageInfos(category);

            return imageInfos;
        }
    }
}
